﻿package com.neriksworkshop.lib.colourLovers.requests 
{
	import com.neriksworkshop.lib.colourLovers.core.AbstractGraphicRequest;
	import com.neriksworkshop.lib.colourLovers.core.AbstractRequest;	
	import com.neriksworkshop.lib.colourLovers.items.Pattern;
	
	
	/**
	 * ...
	 * @author ...
	 */
	public class PatternRequest extends AbstractGraphicRequest implements IRequest
	{
		
		public function PatternRequest() 
		{
			super(this);
			_baseServiceUrl += "/patterns";
		}
		
		public function get hueOption():Array { return _params.hueOption; }
		
		public function set hueOption(value:Array):void 
		{
			_params.hueOption = value;
		}		
		
		public function get hex():String  { return _params.hex; }
		
		public function set hex(value:String):void 
		{
			_params.hex = value;
		}
		
		public function get patterns():/*Pattern*/Array { return _items; }
		
		public function get pattern():Pattern
		{
			if (_items.length != 1) trace("warning: this request contains more than 1 pattern, using the first item");
			return _items[0] as Pattern;
		}		
		
		
	}
	
}